android save int

102

refresh sharedpreferences going back java -

getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);

android save int -

SharedPreferences sp = getSharedPreferences("your_prefs", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putInt("your_int_key", yourIntValue);
editor.commit();

Comments

Submit
0 Comments